package com.trt.beibei.repository;

import com.trt.beibei.model.Theme;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;
import java.util.Optional;

public interface ThemeRepository extends JpaRepository<Theme, Long> {

    @Query("select t from Theme t where t.name in (:nameList)")
    List<Theme> findByNames(List<String> nameList);

    Optional<Theme> findByName(String themeName);

}
